package cn.tedu.spring.exercise;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ProductTest {
    @Test
    public void test(){
        ApplicationContext context =new ClassPathXmlApplicationContext("bean-product.xml");
        Product product=context.getBean("product",Product.class);
        System.out.println("product ="+product);
    }
    @Test
    public void test2(){
        ApplicationContext context =new ClassPathXmlApplicationContext("bean-product.xml");
        Product product=context.getBean("product2",Product.class);
        System.out.println("product ="+product);
    }
}
